package com.yjsn;

import com.alibaba.fastjson2.JSONObject;
import com.yjsn.base.domain.AjaxResult;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
public class BaseApplication {

	public static void main(String[] args) {
		SpringApplication.run(BaseApplication.class, args);
	}

	@GetMapping("/getTest")
	public AjaxResult getTest() {
		return AjaxResult.success("get测试成功");
	}

	@PostMapping("/postTest")
	public AjaxResult postTest(@RequestBody JSONObject  params) {
		return AjaxResult.success("post测试成功: "+  params);
	}
}
